import React, { useState } from "react";
// ant使用的时候可以按需引入
import { Button } from "antd";
import "antd/dist/antd.css";
const Example = () => {
  //  这里的userState是hooks的用法之一，用来储存修改变量

  const [count, setCount] = useState(0);
  const [size, btnTou] = useState("large");
  const btnTous = () => {
    console.log(size);
    btnTou("small");
  };
  return (
    <div>
      <p>You clicked {count} times</p>
      <Button type="link">Link Button</Button>
      <Button type="primary" size={size} onClick={btnTous}>
        Primary
      </Button>
      <button
        onClick={() => {
          setCount(count + 1);
        }}
      >
        click me
      </button>
    </div>
  );
};
export default Example;
